
#import "HelpViewController.h"

@implementation HelpViewController

//
// web view
//
@synthesize webView															= _webView;

//
// resource file
//
@synthesize resoureFile														= _resoureFile;

//
// dealloc
//
- (void)dealloc
{
	self.webView															= nil;
	self.resoureFile														= nil;
	
	[super dealloc];
}

//
// did load
//
- (void)viewDidLoad
{
	[super viewDidLoad];
	
	//
	// create web view
	//
	self.webView															= [[[UIWebView alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height)] autorelease];
	self.webView.autoresizingMask											= UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
	self.webView.scalesPageToFit											= YES;
	[self.view addSubview:self.webView];
	
	//
	// load file
	//
	NSData* contentData														= [NSData dataWithContentsOfFile:[[NSBundle mainBundle] pathForResource:self.resoureFile ofType:@"html"]];
	NSString* content														= [[[NSString alloc] initWithData:contentData encoding:NSUTF8StringEncoding] autorelease];
	[self.webView loadHTMLString:content baseURL:[[NSBundle mainBundle] resourceURL]];
}

@end
